<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>RD.SceneNode</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/RD...html">RD..</a></li>
                                <li><a href="../classes/RD.Billboard.html">RD.Billboard</a></li>
                                <li><a href="../classes/RD.Camera.html">RD.Camera</a></li>
                                <li><a href="../classes/RD.ParticlesEmissor.html">RD.ParticlesEmissor</a></li>
                                <li><a href="../classes/RD.PointCloud.html">RD.PointCloud</a></li>
                                <li><a href="../classes/RD.Renderer.html">RD.Renderer</a></li>
                                <li><a href="../classes/RD.Scene.html">RD.Scene</a></li>
                                <li><a href="../classes/RD.SceneNode.html">RD.SceneNode</a></li>
                                <li><a href="../classes/RD.Sprite.html">RD.Sprite</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>RD.SceneNode Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_rendeer.js.html#l86"><code>..&#x2F;src&#x2F;rendeer.js:86</code></a>
        </div>


</div>


<div class="box intro">
    <p>SceneNode class to hold an scene item</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
<div id="method_RD.SceneNode" class="method item">
    <h3 class="name"><code>RD.SceneNode</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l86"><code>..&#x2F;src&#x2F;rendeer.js:86</code></a>
        </p>



    </div>

    <div class="description">
        
    </div>




</div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_addChild">addChild</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_clear">clear</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_configure">configure</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_findNode">findNode</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_fromMatrix">fromMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getAllChildren">getAllChildren</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getDistanceTo">getDistanceTo</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGlobalMatrix">getGlobalMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGlobalPoint">getGlobalPoint</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGlobalPosition">getGlobalPosition</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGlobalRotation">getGlobalRotation</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getGlobalVector">getGlobalVector</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getLocalMatrix">getLocalMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getLocalPoint">getLocalPoint</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getLocalVector">getLocalVector</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_getVisibleChildren">getVisibleChildren</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_propagate">propagate</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_removeChild">removeChild</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_resetTransform">resetTransform</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_rotate">rotate</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_scale">scale</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_serialize">serialize</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setChildIndex">setChildIndex</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setMesh">setMesh</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setPivot">setPivot</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setTexture">setTexture</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_translate">translate</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_updateGlobalMatrix">updateGlobalMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_updateLocalMatrix">updateLocalMatrix</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_updateMatrices">updateMatrices</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                            <li class="index-item property">
                                <a href="#property_color">color</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_id">id</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_opacity">opacity</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_parentNode">parentNode</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_position">position</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_rotation">rotation</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_scaling">scaling</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_scene">scene</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_shader">shader</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_texture">texture</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_uniforms">uniforms</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_addChild" class="method item">
    <h3 class="name"><code>addChild</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>node</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l311"><code>..&#x2F;src&#x2F;rendeer.js:311</code></a>
        </p>



    </div>

    <div class="description">
        <p>Attach node to its children list</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">node</code>
                        <span class="type"><a href="../classes/RD.SceneNode.html" class="crosslink">RD.SceneNode</a></span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_clear" class="method item">
    <h3 class="name"><code>clear</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l368"><code>..&#x2F;src&#x2F;rendeer.js:368</code></a>
        </p>



    </div>

    <div class="description">
        <p>Remove all childs</p>

    </div>




</div>
<div id="method_configure" class="method item">
    <h3 class="name"><code>configure</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>o</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l462"><code>..&#x2F;src&#x2F;rendeer.js:462</code></a>
        </p>



    </div>

    <div class="description">
        <p>Configure this SceneNode to a state from an object (used with serialize)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">o</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>object with the state of a SceneNode</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_findNode" class="method item">
    <h3 class="name"><code>findNode</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>id</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">SceneNode</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l891"><code>..&#x2F;src&#x2F;rendeer.js:891</code></a>
        </p>



    </div>

    <div class="description">
        <p>Searchs the node and returns the first child node with the matching id, it is a recursive search so it is slow</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">id</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>the id of the node</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">SceneNode</span>:
                    <p>result node otherwise null</p>

            </div>
        </div>


</div>
<div id="method_fromMatrix" class="method item">
    <h3 class="name"><code>fromMatrix</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>m</code>
                </li>
                <li class="arg">
                        <code class="optional">[is_global=false]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l750"><code>..&#x2F;src&#x2F;rendeer.js:750</code></a>
        </p>



    </div>

    <div class="description">
        <p>updates position, rotation and scale from the matrix</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">m</code>
                        <span class="type">Mat4</span>


                    <div class="param-description">
                        <p>the matrix</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[is_global=false]</code>
                        <span class="type">Bool</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>if the matrix is in global or local space</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_getAllChildren" class="method item">
    <h3 class="name"><code>getAllChildren</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>result</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l393"><code>..&#x2F;src&#x2F;rendeer.js:393</code></a>
        </p>



    </div>

    <div class="description">
        <p>Recursively retrieves all children nodes (this doesnt include itself)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">result</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>[Optional] you can specify an array where all the children will be pushed</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>all the children nodes</p>

            </div>
        </div>


</div>
<div id="method_getDistanceTo" class="method item">
    <h3 class="name"><code>getDistanceTo</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>position</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Number</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l878"><code>..&#x2F;src&#x2F;rendeer.js:878</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the distance between the center of the node and the position in global coordinates</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">position</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>the point</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Number</span>:
                    <p>result</p>

            </div>
        </div>


</div>
<div id="method_getGlobalMatrix" class="method item">
    <h3 class="name"><code>getGlobalMatrix</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Mat4</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l632"><code>..&#x2F;src&#x2F;rendeer.js:632</code></a>
        </p>



    </div>

    <div class="description">
        <p>Get transform global matrix (concatenating parents) (its a reference)</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Mat4</span>:
                    <p>matrix44</p>

            </div>
        </div>


</div>
<div id="method_getGlobalPoint" class="method item">
    <h3 class="name"><code>getGlobalPoint</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>v</code>
                </li>
                <li class="arg">
                        <code class="optional">[result=vec3]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l848"><code>..&#x2F;src&#x2F;rendeer.js:848</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a point multiplied by the global matrix</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">v</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>the point</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[result=vec3]</code>
                        <span class="type">Vec3</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>where to store the output</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>result</p>

            </div>
        </div>


</div>
<div id="method_getGlobalPosition" class="method item">
    <h3 class="name"><code>getGlobalPosition</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code class="optional">[result=optional]</code>
                </li>
                <li class="arg">
                        <code class="optional">[fast=optional]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l824"><code>..&#x2F;src&#x2F;rendeer.js:824</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns the node position in global coordinates</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name optional">[result=optional]</code>
                        <span class="type">Vec3</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>where to store the output</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[fast=optional]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>uses the current global amtrix without recomputing it, is faster but if the current matrix hasnt been updated the result will be wrong</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>result</p>

            </div>
        </div>


</div>
<div id="method_getGlobalRotation" class="method item">
    <h3 class="name"><code>getGlobalRotation</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code class="optional">[result=quat]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Quat</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l643"><code>..&#x2F;src&#x2F;rendeer.js:643</code></a>
        </p>



    </div>

    <div class="description">
        <p>Get global rotation (concatenating parent rotations)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name optional">[result=quat]</code>
                        <span class="type">Quat</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>quaternion to store the result</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Quat</span>:
                    <p>resulting rotation in quaternion format</p>

            </div>
        </div>


</div>
<div id="method_getGlobalVector" class="method item">
    <h3 class="name"><code>getGlobalVector</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>v</code>
                </li>
                <li class="arg">
                        <code class="optional">[result=vec3]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l864"><code>..&#x2F;src&#x2F;rendeer.js:864</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a point rotated by the global matrix</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">v</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>the point</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[result=vec3]</code>
                        <span class="type">Vec3</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>where to store the output</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>result</p>

            </div>
        </div>


</div>
<div id="method_getLocalMatrix" class="method item">
    <h3 class="name"><code>getLocalMatrix</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Mat4</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l620"><code>..&#x2F;src&#x2F;rendeer.js:620</code></a>
        </p>



    </div>

    <div class="description">
        <p>Get transform local matrix</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Mat4</span>:
                    <p>matrix44</p>

            </div>
        </div>


</div>
<div id="method_getLocalPoint" class="method item">
    <h3 class="name"><code>getLocalPoint</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>v</code>
                </li>
                <li class="arg">
                        <code class="optional">[result=vec3]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l796"><code>..&#x2F;src&#x2F;rendeer.js:796</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a point multiplied by the local matrix</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">v</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>the point</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[result=vec3]</code>
                        <span class="type">Vec3</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>where to store the output</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>result</p>

            </div>
        </div>


</div>
<div id="method_getLocalVector" class="method item">
    <h3 class="name"><code>getLocalVector</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>v</code>
                </li>
                <li class="arg">
                        <code class="optional">[result=vec3]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Vec3</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l811"><code>..&#x2F;src&#x2F;rendeer.js:811</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns a point rotated by the local rotation</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">v</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>the point</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[result=vec3]</code>
                        <span class="type">Vec3</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>where to store the output</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Vec3</span>:
                    <p>result</p>

            </div>
        </div>


</div>
<div id="method_getVisibleChildren" class="method item">
    <h3 class="name"><code>getVisibleChildren</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code class="optional">[result=[]]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>

        <span class="returns-inline">
            <span class="type">Array</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l413"><code>..&#x2F;src&#x2F;rendeer.js:413</code></a>
        </p>



    </div>

    <div class="description">
        <p>Recursively retrieves all children nodes taking into account visibility (flags.visible)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name optional">[result=[]]</code>
                        <span class="type">Array</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>you can specify an array where all the children will be pushed</p>

                    </div>

                </li>
            </ul>
        </div>

        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Array</span>:
                    <p>all the children nodes</p>

            </div>
        </div>


</div>
<div id="method_propagate" class="method item">
    <h3 class="name"><code>propagate</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>method</code>
                </li>
                <li class="arg">
                        <code>params</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l911"><code>..&#x2F;src&#x2F;rendeer.js:911</code></a>
        </p>



    </div>

    <div class="description">
        <p>calls a function in child nodes</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">method</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>name</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">params</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>array containing the params</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_removeChild" class="method item">
    <h3 class="name"><code>removeChild</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>node</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l337"><code>..&#x2F;src&#x2F;rendeer.js:337</code></a>
        </p>



    </div>

    <div class="description">
        <p>Remove a node from its children list</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">node</code>
                        <span class="type">SceneNode</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_resetTransform" class="method item">
    <h3 class="name"><code>resetTransform</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l544"><code>..&#x2F;src&#x2F;rendeer.js:544</code></a>
        </p>



    </div>

    <div class="description">
        <p>clears position, rotation and scale</p>

    </div>




</div>
<div id="method_rotate" class="method item">
    <h3 class="name"><code>rotate</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>angle_in_rad</code>
                </li>
                <li class="arg">
                        <code>axis</code>
                </li>
                <li class="arg">
                        <code>in_local</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l567"><code>..&#x2F;src&#x2F;rendeer.js:567</code></a>
        </p>



    </div>

    <div class="description">
        <p>Rotate object (supports local or global but doesnt takes into account parent)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">angle_in_rad</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">axis</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">in_local</code>
                        <span class="type">Boolean</span>


                    <div class="param-description">
                        <p>specify if the axis is in local space or global space</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_scale" class="method item">
    <h3 class="name"><code>scale</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>v</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l585"><code>..&#x2F;src&#x2F;rendeer.js:585</code></a>
        </p>



    </div>

    <div class="description">
        <p>Scale object</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">v</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_serialize" class="method item">
    <h3 class="name"><code>serialize</code></h3>

        <span class="paren">()</span>

        <span class="returns-inline">
            <span class="type">Object</span>
        </span>







    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l439"><code>..&#x2F;src&#x2F;rendeer.js:439</code></a>
        </p>



    </div>

    <div class="description">
        <p>Returns an object that represents the current state of this object an its children</p>

    </div>


        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                        <span class="type">Object</span>:
                    <p>object</p>

            </div>
        </div>


</div>
<div id="method_setChildIndex" class="method item">
    <h3 class="name"><code>setChildIndex</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>child</code>
                </li>
                <li class="arg">
                        <code>index</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l378"><code>..&#x2F;src&#x2F;rendeer.js:378</code></a>
        </p>



    </div>

    <div class="description">
        <p>Change the order inside the children, useful when rendering without Depth Test</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">child</code>
                        <span class="type"><a href="../classes/RD.SceneNode.html" class="crosslink">RD.SceneNode</a></span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">index</code>
                        <span class="type">Number</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setMesh" class="method item">
    <h3 class="name"><code>setMesh</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>mesh_name</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l505"><code>..&#x2F;src&#x2F;rendeer.js:505</code></a>
        </p>



    </div>

    <div class="description">
        <p>sets the name of the mesh to be used to render the object</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">mesh_name</code>
                        <span class="type">String | Mesh</span>


                    <div class="param-description">
                        <p>also it accepts a mesh itself</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setPivot" class="method item">
    <h3 class="name"><code>setPivot</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>pivot</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l602"><code>..&#x2F;src&#x2F;rendeer.js:602</code></a>
        </p>



    </div>

    <div class="description">
        <p>Set the pivot point, 0,0,0 by default (WARNING: use flags.pivot = true  to enable the use of the pivot)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">pivot</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                        <p>local coordinate of the pivot point</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setTexture" class="method item">
    <h3 class="name"><code>setTexture</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>channel</code>
                </li>
                <li class="arg">
                        <code>texture</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l520"><code>..&#x2F;src&#x2F;rendeer.js:520</code></a>
        </p>



    </div>

    <div class="description">
        <p>Sets the name of the mesh to be used to render the object</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">channel</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>which channel to use (the texture will be uploaded to the shader with the name &quot;u_&quot; + channel + &quot;_texture&quot;</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">texture</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>texture name (textures are retrieved from the renderer.textures</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_translate" class="method item">
    <h3 class="name"><code>translate</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>delta</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l556"><code>..&#x2F;src&#x2F;rendeer.js:556</code></a>
        </p>



    </div>

    <div class="description">
        <p>Translate object in local space</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">delta</code>
                        <span class="type">Vec3</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_updateGlobalMatrix" class="method item">
    <h3 class="name"><code>updateGlobalMatrix</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code class="optional">[fast=false]</code>
                </li>
                <li class="arg">
                        <code class="optional">[update_childs=false]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l706"><code>..&#x2F;src&#x2F;rendeer.js:706</code></a>
        </p>



    </div>

    <div class="description">
        <p>recomputes _global_matrix according to position, rotation and scaling</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name optional">[fast=false]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>skips recomputation of parent, use it only if you are sure its already updated</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name optional">[update_childs=false]</code>
                        <span class="type">Boolean</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>update global matrix in childs too</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_updateLocalMatrix" class="method item">
    <h3 class="name"><code>updateLocalMatrix</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l665"><code>..&#x2F;src&#x2F;rendeer.js:665</code></a>
        </p>



    </div>

    <div class="description">
        <p>recomputes _local_matrix according to position, rotation and scaling</p>

    </div>




</div>
<div id="method_updateMatrices" class="method item">
    <h3 class="name"><code>updateMatrices</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code class="optional">[fast=false]</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l739"><code>..&#x2F;src&#x2F;rendeer.js:739</code></a>
        </p>



    </div>

    <div class="description">
        <p>recompute local and global matrix</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name optional">[fast=false]</code>
                        <span class="type">Bool</span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>


                    <div class="param-description">
                        <p>uses the global matrix as it is in the parent node instead of crawling all the ierarchy</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

<div id="property_color" class="property item">
    <h3 class="name"><code>color</code></h3>
    <span class="type">Vec4</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l268"><code>..&#x2F;src&#x2F;rendeer.js:268</code></a>
        </p>


    </div>

    <div class="description">
        <p>The color in RGBA format</p>

    </div>

        <p><strong>Default:</strong> [1,1,1,1]</p>


</div>
<div id="property_id" class="property item">
    <h3 class="name"><code>id</code></h3>
    <span class="type">String</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l178"><code>..&#x2F;src&#x2F;rendeer.js:178</code></a>
        </p>


    </div>

    <div class="description">
        <p>A unique identifier, useful to retrieve nodes by name</p>

    </div>



</div>
<div id="property_opacity" class="property item">
    <h3 class="name"><code>opacity</code></h3>
    <span class="type">Number</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l279"><code>..&#x2F;src&#x2F;rendeer.js:279</code></a>
        </p>


    </div>

    <div class="description">
        <p>This number is the 4� component of color but can be accessed directly</p>

    </div>



</div>
<div id="property_parentNode" class="property item">
    <h3 class="name"><code>parentNode</code></h3>
    <span class="type">SceneNode</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l300"><code>..&#x2F;src&#x2F;rendeer.js:300</code></a>
        </p>


    </div>

    <div class="description">
        <p>The parent node where this node is attached</p>

    </div>



</div>
<div id="property_position" class="property item">
    <h3 class="name"><code>position</code></h3>
    <span class="type">Vec3</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l213"><code>..&#x2F;src&#x2F;rendeer.js:213</code></a>
        </p>


    </div>

    <div class="description">
        <p>The position relative to its parent in vec3 format</p>

    </div>



</div>
<div id="property_rotation" class="property item">
    <h3 class="name"><code>rotation</code></h3>
    <span class="type">Quat</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l223"><code>..&#x2F;src&#x2F;rendeer.js:223</code></a>
        </p>


    </div>

    <div class="description">
        <p>The orientation relative to its parent in quaternion format</p>

    </div>



</div>
<div id="property_scaling" class="property item">
    <h3 class="name"><code>scaling</code></h3>
    <span class="type">Vec3</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l234"><code>..&#x2F;src&#x2F;rendeer.js:234</code></a>
        </p>


    </div>

    <div class="description">
        <p>The scaling relative to its parent in vec3 format (default is [1,1,1])</p>

    </div>



</div>
<div id="property_scene" class="property item">
    <h3 class="name"><code>scene</code></h3>
    <span class="type">Scene</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l289"><code>..&#x2F;src&#x2F;rendeer.js:289</code></a>
        </p>


    </div>

    <div class="description">
        <p>The scene where this node is attached</p>

    </div>



</div>
<div id="property_shader" class="property item">
    <h3 class="name"><code>shader</code></h3>
    <span class="type">String</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l193"><code>..&#x2F;src&#x2F;rendeer.js:193</code></a>
        </p>


    </div>

    <div class="description">
        <p>the name of the shader in the shaders manager</p>

    </div>



</div>
<div id="property_texture" class="property item">
    <h3 class="name"><code>texture</code></h3>
    <span class="type">String</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l534"><code>..&#x2F;src&#x2F;rendeer.js:534</code></a>
        </p>


    </div>

    <div class="description">
        <p>name of texture to use in the color channel (the same as SetTexture(&quot;color&quot;, name ))</p>

    </div>



</div>
<div id="property_uniforms" class="property item">
    <h3 class="name"><code>uniforms</code></h3>
    <span class="type">Vec3</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l199"><code>..&#x2F;src&#x2F;rendeer.js:199</code></a>
        </p>


    </div>

    <div class="description">
        <p>The position relative to its parent</p>

    </div>



</div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
